package com.itzhoun;

/**
 * @author 周楠
 * @Date 2023/03/06/下午 10:53
 */
public class Contral {

    public void commandExecute(Command command){
        command.excute();

    }

    public static void main(String[] args) {
        Contral contral = new Contral();

        contral.commandExecute(new OffLight(new Light("开灯")));
        contral.commandExecute(new OnLight(new Light("关灯")));
    }
}
